package com.guanjia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.guanjia.entity.Bussiness;
import com.guanjia.entity.EnterpriseInformation;
import com.guanjia.entity.User;
import com.guanjia.entity.UserInformation;
import com.guanjia.entity.vo.BussinessVo;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface UserMapper extends BaseMapper<User> {

    User findUserBytell(String tell);

    User findUserById(Integer id);

    UserInformation findUserInfoByUserId(Integer id);

    public Integer insertUserInfo(UserInformation userInformation);

    Integer updateUserInfo(UserInformation userInformation);

    EnterpriseInformation findUserEnterInfoByUserId(Integer id);

    Integer updateenterInfo(EnterpriseInformation enterpriseInformation);//企业信息

    Integer insertEnter(EnterpriseInformation enterpriseInformation);

    List<Bussiness> findUsertransactionByUserId(Integer id);//交易记录

    List<Bussiness> findUsertransactionInfoByUserId(BussinessVo bussinessVo);//交易记录

    Integer insertBussiness(Bussiness bussiness);

    String SumrechangetransactionByUserId(Integer id);

    String SumtforwardransactionByUserId(Integer id);

    UserInformation findUserNameById(Integer id);
}
